﻿using Kingdee.BOS;
using Kingdee.BOS.App.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LianKe.BaseData
{
    public class BaseParam
    {
        public static string scheduleClassName = "LianKe.LianKeSchedule.CreateSchedule,LianKe";
        /// <summary>
        /// 获取服务器时间
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public static DateTime GetServerTime(Context context)
        {
            string sql = "SELECT GETDATE()";
            DateTime dt = DBUtils.ExecuteScalar<DateTime>(context, sql, DateTime.Now);
            return dt;
        }
        /// <summary>
        /// 账表数据保存参数
        /// </summary>
        public class ScheduleParameter
        {
            /// <summary>
            /// 用户名(登录账号)
            /// </summary>
            public string UserName { get; set; }
            /// <summary>
            /// 账表FormId
            /// </summary>
            public string RptFormId { get; set; }
            /// <summary>
            /// 账表的过滤窗体的FormId
            /// </summary>
            public string RptFilterFormId { get; set; }
            /// <summary>
            /// 过滤方案内码
            /// </summary>
            public string SchemeId { get; set; }
            /// <summary>
            /// 收件邮箱地址列表
            /// </summary>
            public List<string> To { get; set; }
            /// <summary>
            /// 文件名称
            /// </summary>
            public string ScheduleName { get; set; }
            /// <summary>
            /// 日期字段标识
            /// </summary>
            public string fileName { get; set; }
            /// <summary>
            /// 起止日期范围
            /// </summary>
            public StartDate StartDate { get; set; }
        }
    }
}
